package com.gitee.zzh.controller;

import javafx.fxml.FXML;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;

import java.net.URL;
import java.util.ResourceBundle;

/**
 * 使用帮助
 */
public class AboutUsController extends BaseController {
	/** 当前版本 */
	@FXML
	private Label lblNameVersion;
	/** 使用说明 */
	@FXML
	private Label lblInstructions;
	/** 项目地址 */
	@FXML
	private Label lblProjectPath;
	/** 作者邮箱 */
	@FXML
	private Label lblAuthorsEmail;
	/** 使用说明 */
	@FXML
	private TextField txtInstructions;
	/** 项目地址 */
	@FXML
	private TextField txtProjectPath;
	/** 作者邮箱 */
	@FXML
	private TextField txtAuthorsEmail;

	@Override
	public void initialize(URL arg0, ResourceBundle arg1) {
		lblNameVersion.setText("Spring-Boot-MybatisPlus-Generator_1.0.0");
		
		final int ml = 10;// 左外边距
		lblInstructions.widthProperty().addListener(w -> txtInstructions.setLayoutX(ml + lblInstructions.getLayoutX() + lblInstructions.getWidth()));
		lblProjectPath.widthProperty().addListener(w -> txtProjectPath.setLayoutX(ml + lblProjectPath.getLayoutX() + lblProjectPath.getWidth()));
		lblAuthorsEmail.widthProperty().addListener(w -> txtAuthorsEmail.setLayoutX(ml + lblAuthorsEmail.getLayoutX() + lblAuthorsEmail.getWidth()));
	}

}
